Optimal. Leaf size=26 \[ -\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {4207, 223, 212}
\begin {gather*} -\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 223
Rule 4207
Rubi steps
\begin {align*} \int \sqrt {a \csc ^2(x)} \, dx &=-\left (a \text {Subst}\left (\int \frac {1}{\sqrt {a+a x^2}} \, dx,x,\cot (x)\right )\right )\\ &=-\left (a \text {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}\right )\right )\\ &=-\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 30, normalized size = 1.15 \begin {gather*} \sqrt {a \csc ^2(x)} \left (-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sin (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 32, normalized size = 1.23
method | result | size |
default | \(\frac {\sin \left (x \right ) \ln \left (-\frac {\cos \left (x \right )-1}{\sin \left (x \right )}\right ) \sqrt {-\frac {a}{\cos ^{2}\left (x \right )-1}}\, \sqrt {4}}{2}\) | \(32\) |
risch | \(-2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}+1\right ) \sin \left (x \right )+2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}-1\right ) \sin \left (x \right )\) | \(64\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.56, size = 24, normalized size = 0.92 \begin {gather*} -\sqrt {-a} {\left (\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.57, size = 64, normalized size = 2.46 \begin {gather*} \left [\frac {1}{2} \, \sqrt {-\frac {a}{\cos \left (x\right )^{2} - 1}} \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1}\right ) \sin \left (x\right ), \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {-\frac {a}{\cos \left (x\right )^{2} - 1}} \cos \left (x\right ) \sin \left (x\right )}{a}\right )\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \csc ^{2}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 13, normalized size = 0.50 \begin {gather*} \sqrt {a} \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \mathrm {sgn}\left (\sin \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \sqrt {\frac {a}{{\sin \left (x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________